<?

class stats_aggregation
{
	private $data = array();
	private $datelist;
	
	function get_datelist()
	{
		return $this->datelist;
	} 
	
	function update_aggregate(&$statsobj)
	{
		$this->datelist = $statsobj->get_dnsserver("alpha")->get_datelist_from("2010-08-30");

		foreach($this->datelist as $date=>$v)
		{
			if($date=="") continue; 
			foreach($statsobj->get_aggregate_date($date) as $k=>$num)
 			{
				$pd = $statsobj->get_pooldata($k);
				$this->data[$date][$pd[1]] += $num;
 			}
		}		
	}
	
	function get_aggreg()
	{
		
		return $this->data;
	}
}
?>